// Alex Silkin
#pragma once

#ifndef INSPECTOR_AGENT_H
#define INSPECTOR_AGENT_H

#include <string>
#include <list>

#include "Agent.h"
#include "Inspector.h"
#include "KitRobot.h"
#include "Table.h"
#include "GUICameraInterface.h"

class Agent;
class KitRobot;
class Table;
class GUICameraInterface;

class InspectorAgent : public Inspector, public Agent
{
public:

	InspectorAgent(std::string name);

	~InspectorAgent();

	// ------------------------------------------------------------------------------------
	// Messages:

	virtual void msgInspectKit();							// Called by KitRobot

	// ------------------------------------------------------------------------------------

	// ------------------------------------------------------------------------------------
	// Scheduler

	virtual bool pickAndExecuteAnAction();

	// ------------------------------------------------------------------------------------


	// ------------------------------------------------------------------------------------
	// Accessors

	// Access the KitRobot
	const KitRobot* GetKitRobot(void) const		{ return(kitRobot);		};
	void SetKitRobot(KitRobot* _kitRobot)	{ kitRobot = _kitRobot;	};

	// Access the Table
	const Table* GetTable(void) const	{ return(table);	};
	void SetTable(Table* _table)	{ table = _table;	};

	// ------------------------------------------------------------------------------------
	
	
	// Access the Gui
	const GUICameraInterface* GetGui(void) const	{ return(gui);	};
	void SetGui(GUICameraInterface* _gui)	{ gui = _gui;};
	
private:

	// ------------------------------------------------------------------------------------
	// Actions
	 
	void inspectKitOnTable();

	// ------------------------------------------------------------------------------------

	
	// ------------------------------------------------------------------------------------
	// Data

	KitRobot* kitRobot;
	Table* table;
	
	bool inspectionScheduled;

	GUICameraInterface* gui;

	// ------------------------------------------------------------------------------------

};

#endif